package com.sitanyun.merchant.guide.presenter.impl;

import com.sitanyun.merchant.guide.frament.presenter.callback.CallBack;
import com.sitanyun.merchant.guide.model.impl.SetingPaswdAModelImpl;
import com.sitanyun.merchant.guide.model.inter.ISetingPaswdAModel;
import com.sitanyun.merchant.guide.presenter.inter.ISetingPaswdAPresenter;
import com.sitanyun.merchant.guide.view.inter.ISetingPaswdAView;

public class SetingPaswdAPresenterImpl implements ISetingPaswdAPresenter {
    private ISetingPaswdAView mISetingPaswdAView;
    private ISetingPaswdAModel mISetingPaswdAModel;

    public SetingPaswdAPresenterImpl(ISetingPaswdAView aISetingPaswdAView) {
        mISetingPaswdAView = aISetingPaswdAView;
        mISetingPaswdAModel = new SetingPaswdAModelImpl();
    }

    @Override
    public void getingpswd(String name, String password, String id, String phone) {
        mISetingPaswdAModel.setingpswd(name, password, id, phone, new CallBack() {
            @Override
            public void onSuccess(Object response) {
                mISetingPaswdAView.response(response,ISetingPaswdAView.RESPONSE_ONE);
            }

            @Override
            public void onError(Throwable t) {
                mISetingPaswdAView.response(t,ISetingPaswdAView.RESPONSE_TWO);

            }
        });
    }
}
